import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import StuLogin from '../views/StuLogin.vue'
import StuIndex from '../views/StuIndex.vue'
import Roommate from '../views/Roommate.vue'
import AdminLogin from '../views/admin/AdminLogin.vue'
import AdminRegister from '../views/admin/AdminRegister.vue'
import AdminIndex from '../views/admin/AdminIndex.vue'
import SetApartment from '../views/admin/SetApartment.vue'
import BuildingInfo from '../views/admin/BuildingInfo.vue'
import RoomInfo from '../views/admin/RoomInfo.vue'
import BedInfo from '../views/admin/BedInfo.vue'
import AdminInfo from '../views/admin/AdminInfo.vue'
import AdminPermissions from '../views/admin/AdminPermissions.vue'


const routes: Array<RouteRecordRaw> = [
  {
    path: '/stu/login',
    name: 'stuLogin',
    component: StuLogin
  },
  {
    path: '/admin/login',
    name: 'adminLogin',
    component: AdminLogin
  },
  {
    path: '/admin/register',
    name: 'adminRegister',
    component: AdminRegister
  },
  {
    path: '/admin',
    name: 'adminIndex',
    component: AdminIndex
  },
  {
    path: '/admin/apartment',
    name: 'setApartment',
    component: SetApartment
  },
  {
    path: '/admin/buildingInfo',
    name: 'buildingInfo',
    component: BuildingInfo
  },
  {
    path: '/admin/roomInfo',
    name: 'roomInfo',
    component: RoomInfo
  },
  {
    path: '/admin/bedInfo',
    name: 'bedInfo',
    component: BedInfo
  },
  {
    path: '/admin/adminInfo',
    name: 'adminInfo',
    component: AdminInfo
  },
  {
    path: '/admin/adminInfo',
    name: 'adminInfo',
    component: AdminInfo
  },
  {
    path: '/admin/adminPermissions',
    name: 'adminPermissions',
    component: AdminPermissions
  },
  {
    path: '/stuLogin',
    name: 'stuLogin',
    component: StuLogin
  },
  {
    path: '/',
    name: 'stuIndex',
    component: StuIndex
  },
  {
    path: '/roommate',
    name: 'roommate',
    component: Roommate
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
